﻿// This software is the confidential and proprietary information of NetBay.
// Such confidential information should not be disclosed.
// NetBay copyright(c) 2012

#region

using System;
using System.Globalization;
using System.Windows.Data;
using Rio.Framework.Localisation;
using Rio.Framework.Pages.Enums;

#endregion

namespace Rio.Framework.Pages.AppCode.Helpers.Converter
{
    public class ApplicationModeConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value != null)
            {
                ApplicationName mode = (ApplicationName) value;
                return Resx.GetLabel((ResxApplication) Enum.ToObject(typeof (ResxApplication), mode));
            }
            return string.Empty;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}